package com.yedean.factory.support;

import com.yedean.factory.io.DefaultResourceLoader;
import com.yedean.factory.io.ResourceLoader;

/**
 * AbstractBeanDefinitionRegistry
 *
 * @author yedean
 * @date 2022/7/7
 */
public abstract class AbstractBeanDefinitionReader implements BeanDefinitionReader{
    
    private final BeanDefinitionRegistry beanDefinitionRegistry;

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry beanDefinitionRegistry, ResourceLoader resourceLoader) {
        this.beanDefinitionRegistry = beanDefinitionRegistry;
        this.resourceLoader = resourceLoader;
    }

    private final ResourceLoader resourceLoader;

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry registry) {
        this(registry,new DefaultResourceLoader());
    }
    
    

    @Override
    public BeanDefinitionRegistry getRegistry() {
        return beanDefinitionRegistry;
    }

    @Override
    public ResourceLoader getResourseLoader() {
        return resourceLoader;
    }
}
